import { Operation } from './operation'
import type Editor from './../editor'
import type { Selection } from './../models/selection_model'

export class SetSelectionOperation extends Operation {
    private _selection : Selection = {
        anchor:0,
        focus:0
    };

    constructor (selection:Selection) {
        super()
        this._selection = selection
    }
    apply (editor:Editor) : void {
        editor.getSelectionModel().setSelection(this._selection)
    }
    reverse():Operation {
        throw new Error('Method not implemented.');
    }
    
}
export default SetSelectionOperation
